Public Class frmQuanLyDonVi

    Private Sub frmQuanLyDonVi_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'CSDLSVDataSet.tblChucVu' table. You can move, or remove it, as needed.
        Me.TblChucVuTableAdapter.Fill(Me.CSDLSVDataSet.tblChucVu)
        'TODO: This line of code loads data into the 'CSDLSVDataSet.tblDonVi' table. You can move, or remove it, as needed.
        Me.TblDonViTableAdapter.Fill(Me.CSDLSVDataSet.tblDonVi)
        'TODO: This line of code loads data into the 'CSDLSVDataSet.tblLoaiDonVi' table. You can move, or remove it, as needed.
        Me.TblLoaiDonViTableAdapter.Fill(Me.CSDLSVDataSet.tblLoaiDonVi)

    End Sub

    Private Sub TblDonViBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TblDonViBindingNavigatorSaveItem.Click
        Me.Validate()
        Me.TblDonViBindingSource.EndEdit()
        Me.TblDonViTableAdapter.Update(Me.CSDLSVDataSet.tblDonVi)
    End Sub

    Private Sub TblLoaiDonViBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TblLoaiDonViBindingNavigatorSaveItem.Click
        Me.Validate()
        Me.TblLoaiDonViBindingSource.EndEdit()
        Me.TblLoaiDonViTableAdapter.Update(Me.CSDLSVDataSet.tblLoaiDonVi)

    End Sub

    Private Sub TblChucVuBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TblChucVuBindingNavigatorSaveItem.Click
        Me.Validate()
        Me.TblChucVuBindingSource.EndEdit()
        Me.TblChucVuTableAdapter.Update(Me.CSDLSVDataSet.tblChucVu)
    End Sub

    Private Sub FillByTenOrMaDonViToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FillByTenOrMaDonViToolStripButton.Click
        Try
            Me.TblDonViTableAdapter.FillByTenOrMaDonVi(Me.CSDLSVDataSet.tblDonVi, TenOrMaDonViToolStripTextBox.Text, TenOrMaDonViToolStripTextBox.Text)
        Catch ex As System.Exception
            System.Windows.Forms.MessageBox.Show(ex.Message)
        End Try

    End Sub

End Class